import { request } from "./request"

//  /dev-api/activity/api/activity/getActivityDetails api-获取活动详情
export function getActivityDetails(data) {
	return request({
		url: '/activity/api/activity/getActivityDetails',
		method: 'get',
		data
	})
}

// /dev-api/activity/api/activity/activityForwardShare 分享
export function activityForwardShare(data) {
	return request({
		url: '/activity/api/activity/articleShare',
		method: 'post',
		data
	})
}

// /api/login/updateInvite  psot 活动新增抽奖数量
export function updateInvite(data) {
	return request({
		url: '/activity/api/login/updateInvite',
		method: 'post',
		data
	})
}



// /
export function getAppId(data) {
	return request({
		url: '/activity/api/login/getAppId',
		method: 'post',
		data
	})
}

// /api/activity/getVerificationList?activityId=1 获取已中奖接口
export function getVerificationList(data) {
	return request({
		url: '/activity/api/activity/getVerificationList',
		method: 'get',
		data
	})
}

//  /dev-api/activity/api/prizeDraw/getPrizeDraw 领取中奖记录
export function getPrizeDraw(data) {
	return request({
		url: '/activity/api/prizeDraw/getPrizeDraw',
		method: 'get',
		data
	})
}

//  /api/login/generateQRCode 生成二维码 
export function generateQRCode(data) {
	return request({
		url: '/activity/api/login/generateQRCode',
		method: 'post',
		data,
		responseType:'arraybuffer',
		
	})
}


//  /dev-api/activity/api/login/login 微信登录
export function login(data) {
	return request({
		url: '/activity/api/login/login',
		method: 'post',
		data
	})
}

//  /dev-api/activity/api/login/login 抽奖
export function prizeDrawRaffle(data) {
	return request({
		url: '/activity/api/prizeDraw/raffle',
		method: 'post',
		data
	})
}

//  /activity/api/verify-access 验证域名
///activity/api/verify-access post请求

export function verifyAccess(data) { // 接收生成的url和其他业务参数
	return request({
		url: '/activity/api/verify-access',
		header: { 'Referer': data.url }, // 设置Referer请求头为生成的url
		method: 'post',
	})
}
///dev-api/activity/api/activity/inputArticleReadNum
export function inputArticleReadNum(data) { // 接收生成的url和其他业务参数
	return request({
		url: '/activity/api/activity/inputArticleReadNum',
		method: 'post',
		data
	})
}



